package com.example.skilltest.service;

import com.example.skilltest.dao.EmployeeDAO;
import com.example.skilltest.entity.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class EmployeeService {
    @Autowired
    EmployeeDAO employeeDAO;

    public Employee getEmpById(int id){
        return employeeDAO.getEmpById(id);
    }

    public List<Employee> getEmpListByIds(){
        List<Integer> ids = new ArrayList<>();
        ids.add(1);
        ids.add(2);
        ids.add(3);
        ids.add(4);
        ids.add(5);
        return employeeDAO.getEmpListByIds(ids);
    }
}

